-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly clear out customers before testing #45229
Conversation
Hi , @woocommerce/vortex Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Test Results SummaryCommit SHA: c31b3e5
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lanej0 This looks good except for that one question.
await api.get( 'customers' ).then( ( response ) => { | ||
oldCustomers = response.data; | ||
} ); | ||
await api.post( `customers/batch`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it create an api error if oldCustomers
is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I tested it locally on my machine where there are no customers and no error is thrown. So it works either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like the approach. 👍🏼
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
Fixes the e2e failure that we're seeing on the "On PR merge" workflow. This explicitly clears out any existing customers before running the customer list tests.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Changelog entry
Significance
Type
Message
Comment